package com.ysz.component.constant;

/**
 * @ClassName MyBatisConst
 * @Description 自定义常量
 * @Data 9:56
 * @Version 1.0
 * @Author ysz
 */
public enum MyBatisConst {
    /**
     * 定义平台类型
     */
    database_type("PLAT_FORM_TYPE", null),
    mysql_type("PLAT_FORM_TYPE", "MYSQL"),
    oracle_type("PLAT_FORM_TYPE", "ORACLE"),
    /**
     * 分页标志
     */
    page_flag("BY_PAGE_FLAG", "(.*)ByPage(.*)"),
    /**
     * 自定义count查询标志
     */
    count_flag("COUNT_SUFFIX", "ByCount"),

    /**
     * 自定义打印sql执行耗时
     */
    sql_trace_watch("TRACE_WATCH", null),
    sql_trace_watch_enable("TRACE_WATCH", "true"),
    sql_trace_watch_close("TRACE_WATCH", "false"),

    /**
     * 自定义结果集加密
     */
    sql_result_encrypt("RESULT_ENCRYPT", null),
    sql_result_encrypt_enable("RESULT_ENCRYPT", "true"),
    sql_result_encrypt_close("RESULT_ENCRYPT", "false"),


    /**
     * 自定义分表
     */
    sql_table_shard("TABLE_SHARD", null),
    sql_table_shard_enable("TABLE_SHARD", "true"),
    sql_table_shard_close("TABLE_SHARD", "false");

    private String key;
    private String value;

    MyBatisConst(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }


    public String getValue() {
        return value;
    }

}
